CryptoJS = require('crypto-js')
function encrypt(str, key, iv) {
    var key = CryptoJS.enc.Hex.parse(key);
    var iv  = CryptoJS.enc.Hex.parse(iv);
    console.log(iv)
    var opinion = {iv:iv, padding:CryptoJS.pad.ZeroPadding};
    // console.log(opinion)
    var encrypted = CryptoJS.AES.encrypt(str, key, opinion);
    encrypted = encrypted.toString();

    return encrypted;
}


token = "1a0634c219c4f7dbd5e4c46c60c4174d"
iv = "1234567890abcdef1234567890abcdef"
password = "123131"

console.log(encrypt(password, token, iv));